import React, { useState, useEffect } from "react";
import { Tabs } from "antd-mobile";
import Unit from "../../unit/unit";
const View = (props: any) => {
  const rks = () => {
    props.history.push("/personal/sellwhole");
  };
  const rkp = () => {
    props.history.push("/personal/buywhole");
  };
  const rkps = () => {
    props.history.push("/personal/homepage");
  };
  const she = () => {
    props.history.push("/personal/shezhi");
  };
  const [state, setState]: any = useState({});

  return (
    <>
      <div className="w_wod">
        <div className="bangs">
          <h2>我的</h2>
          <img
            onClick={she}
            src={require("../../style/bg_images/wyh/设-置.png").default}
            alt=""
          />
        </div>
        <div className="user_imgbgd">
          <img src={state.userimg} alt="" />
        </div>
        {/* 遮罩层 */}
        <div className="wod_tc">
          {/* 用户头像 */}
          <div className="tc_user_img">
            <div className="user_div">
              <img className="user_img" src={state.userimg} alt="" />
            </div>
          </div>
          {/* 用户昵称 */}
          <div className="w_user_nickname">
            <div className="nickname">
              <span>{state.username}</span>
            </div>
            {/* 个性签名 */}
            <div className="autograph">
              <span>{state.userqianming}</span>
            </div>
          </div>
          {/* 关注，粉丝，点赞,个人主页 */}
          <div className="follow_box">
            <div className="follow_box_x">
              <div className="follow">
                <p>{state.guanzhu}</p>
                <span>关注</span>
              </div>
              <div className="fans">
                <p>{state.fensi}</p>
                <span>粉丝</span>
              </div>
              <div className="fabulous">
                <p>{state.dianzan}</p>
                <span>点赞</span>
              </div>
            </div>
            <div className="homepage">
              <div onClick={rkps} className="homepage_x">
                <span>个人主页&gt;</span>
              </div>
            </div>
          </div>
        </div>
        {/* 我买的，我卖的 */}
        <div className="business">
          <Tabs>
            <Tabs.Tab title="我卖的" key="fruits">
              <div className="purchase">
                <span className="pur1">购买订单</span>
                <span onClick={rks} className="pur2">
                  查看全部&gt;
                </span>
              </div>
            </Tabs.Tab>
            <Tabs.Tab title="我买的" key="vegatables">
              <div className="purchase2">
                <span className="pur11">购买订单</span>
                <span onClick={rkp} className="pur22">
                  查看全部&gt;
                </span>
              </div>
              <div className="purul">
                <ul>
                  <li>
                    <img
                      src={require("../../style/bg_images/wyh/qs.png").default}
                      alt=""
                    />
                  </li>
                  <li>
                    <img
                      src={require("../../style/bg_images/wyh/yqs.png").default}
                      alt=""
                    />
                  </li>
                  <li>
                    <img
                      src={require("../../style/bg_images/wyh/sh.png").default}
                      alt=""
                    />
                  </li>
                </ul>
                <div className="pur3">
                  <span>订单签收</span>
                  <span>已签收</span>
                  <span>申请/售后</span>
                </div>
              </div>
            </Tabs.Tab>
          </Tabs>
        </div>
      </div>
    </>
  );
};

export default View;
